home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / shell / xd-2.08 / xd-2 / xd / Arbiter / select.cc < prev   
Encoding:
C/C++ Source or Header  |  1994-08-30  |  323 b   |  22 lines

  1. #include "Arbiter.h"
  2.  
  3. void Arbiter::select(void)
  4. {
  5.     NonCanon
  6.         nckbd;
  7.     register unsigned
  8.         c;
  9.  
  10.     c = nckbd.get();            // get the replay
  11.  
  12.     number = 
  13.         '0' <= c && c <= '9' ?
  14.         c  - '0'             // numbers < 10
  15.         :
  16.         c - ('a' - 10);            // numbers above 10
  17.  
  18.     if (number > count)            // none selected
  19.         number = 0;
  20.  
  21. }
  22.